package com.yq.day30.udp1.v2;

import com.yq.utils.NetUtils;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.SocketException;
import java.net.UnknownHostException;

/**
 * @author 3307235355@qq.com
 * @description
 * @since 2022/06/30 16:46
 */
public class Sender {
    public static void main(String[] args) throws IOException {
        DatagramSocket socket = new DatagramSocket(8888);
        // DatagramPacket sendPacket = NetUtils.getSendPacket("666", "192.168.13.75", 9999);
        DatagramPacket sendPacket = NetUtils.getSendPacket("丁宏瑞", "192.168.13.58", 9999);
        socket.send(sendPacket);
        socket.close();
    }
}
